﻿using System;
using System.Windows.Data;

using Rio.Applications.Web.Services;

namespace Rio.Manager.Application.Converters
{
    public class EnumToDescriptionAttributeConverter : IValueConverter
    {
        #region Methods

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            Enum e = value as Enum;

            return Constant.szGetDescription(e);
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }

        #endregion Methods
    }
}